package interview;


import java.util.Arrays;

/**
 * [2, 3, 1, 4, 7, 3, 9]
 *
 * [1, 3, 3, 7, 9, 2, 4]
 */
public class HuohuaInterview {


    public static void main(String[] args) {
        int arr[] = new int[]{2, 3, 1, 4, 7, 3, 9};

        int i = 0;
        int j = 0;
        while (i != j){
            i ++;
            j --;
            // [0 - arr.length / 2] item % 2 == 0 &&
            // [arr.length / 2 - arr.length] item / %2 != 0



        }

    }

    /**
     * set arr item
     * @param isBefore
     * @param newArr
     * @param val
     */
    public static void setArrItem(boolean isBefore, int[] newArr, int val){
        if(!isBefore){
            for (int i = 0; i < newArr.length; i++) {
                if(newArr[i] > 0){
                    i ++;
                }else{
                    newArr[i] = val;
                    break;
                }
            }
        }else{
            for (int i = newArr.length - 1; i >= 0; i--) {
                if(newArr[i] > 0){
                    i --;
                }else{
                    newArr[i] = val;
                    break;
                }
            }
        }
    }


}
